Skip to content

[3.12] gh-157190: Fix tarfile data/tar filter bypass via hard link to a symlink (GH-157191) (GH-157192) - #157454

Merged
Yhg1s merged 2 commits into
python:3.12from
StanFromIreland:backport-b8f23e3-3.12
Sep 30, 2026
Merged

Yhg1s merged 2 commits into
python:3.12from
StanFromIreland:backport-b8f23e3-3.12

Conversation

@StanFromIreland

@StanFromIreland StanFromIreland commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

(cherry picked from commit 480ea4a) The backport to 3.13 and below includes a NEWS entry.

…rd link to a symlink (pythonGH-157191)  (pythonGH-157192)

(cherry picked from commit 480ea4a)
The backport to 3.13 and below includes a NEWS entry.
(cherry picked from commit b8f23e3)

Co-authored-by: Stan Ulbrych <stan@python.org>
@StanFromIreland StanFromIreland added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes and removed awaiting core review labels Sep 13, 2026
cesararroba added a commit to prowler-cloud/prowler that referenced this pull request Sep 21, 2026
… MCP lock

Touching api/ woke the API container gate, and Grype (not Trivy)
blocks on CVE-2026-82049, HIGH, in the CPython 3.12.13 interpreter of
the base image. The SDK image shares the base and fails the same way.
It is pre-existing on master, not caused by the anyio bump.

There is no fixed CPython release on any branch: the fix is merged on
main and 3.13 only, the 3.12 backport is still open:
python/cpython#157454
Grype records 3.14.0b1 as the fix, so only-fixed does not drop it,
and python:3.12.14-slim-trixie reports it too, so a base image bump
does not help. Upstream issue:
python/cpython#157190

Exposure: the CVE is a tarfile extraction-filter bypass. Prowler
never extracts tar archives to disk; the only first-party tarfile
use (ECR image inspection) reads members in memory with
extractfile().

Changing .grype.yaml wakes the MCP and UI container gates too, and
the MCP lock still carried anyio 4.13.0, so it is bumped here to
4.14.2 (lock only, anyio is transitive there). The lock change is
byte-identical to dependabot's #12844, which this supersedes.

Verified with Grype 0.116.1 (the CI version), --only-fixed --by-cve,
against python:3.12.13-slim-trixie: master's .grype.yaml reports
CVE-2026-82049 on python, the updated one reports no High/Critical
python findings.

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving on the basis this is the same patch from #157191; I've added the missing test shim that was causing the test failures.

@StanFromIreland

Copy link
Copy Markdown
Member Author

Great, thanks!

@Yhg1s
Yhg1s merged commit cc16898 into python:3.12 Sep 30, 2026
28 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR, and @Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @StanFromIreland and @Yhg1s, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker cc1689830c6b9aaddded2fb9f2fe8116867e2c0e 3.11

@miss-islington-app

Copy link
Copy Markdown

Sorry, @StanFromIreland and @Yhg1s, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker cc1689830c6b9aaddded2fb9f2fe8116867e2c0e 3.10

@StanFromIreland
StanFromIreland deleted the backport-b8f23e3-3.12 branch September 30, 2026 20:18
@StanFromIreland StanFromIreland removed needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants